import { createRouter, createWebHashHistory } from 'vue-router'

export const routes = [
    // 登录
    {
        path: '/login',
        name: 'Login',
        component: () => import('@/pages/login/login.vue'),
    },
    // 传统布局
    {
        path: '/',
        name: 'Layout',
        redirect: "/flow/analysis",
        component: () => import('@/layout/layout.vue'),
        children: []
    },
    // 中心
    {
        path: '/center',
        name: 'Center',
        component: () => import('@/pages/center/center.vue'),
        children: [
            // 报表中心
            {
                path: 'sheet',
                name: 'Sheet',
                component: () => import('@/pages/center/sheet/sheet.vue')
            },
            // 指标中心
            {
                path: 'target',
                name: 'Target',
                component: () => import('@/pages/center/target/target.vue')
            },
            // 报告中心
            {
                path: 'report',
                name: 'Report',
                component: () => import('@/pages/center/report/report.vue')
            }
        ]
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router
